package chai.ning.collection;

import java.util.ArrayList;
import java.util.Collection;

public class CollectionTest1 {

	public static void main(String[] args) {
		
	//接口类型的引用变量指向了实现类类型的对象
		Collection<String> c = new ArrayList<>(); 
		System.out.println( "size : " + c.size() + " , is empty : " + c.isEmpty() );
	
		c.add( "李刚" );
		c.add( "李玉" );
		
		System.out.println( "collection" + c );
		System.out.println( "size : " + c.size() + " , is empty : " + c.isEmpty() );
		
		System.out.println( c.contains( "李克" ));
		System.out.println( c.contains( "李玉" ));
	}
}
